package com.yoyo.ad.bean;

import com.yoyo.ad.confusion.AdManage;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

@Entity/*(// Define indexes spanning multiple columns here.
        indexes = {
                @Index(value = "adId DESC, boundedType DESC", unique = true)
        })*/
public class AdInterceptBean {

    @Id(autoincrement = true)
    private Long id;

    private long adId;

    private int adPositionId;
    /*
     * 限制类型 1设备时间限制次数,2设备单日总次数限制次数,3ip,4总来源单次展示最少间隔时间,5总来源单日最多展示次数,6广告位限制次数
     */
    private int boundedType;

    //限制日期
    private String boundedTime;

    @Generated(hash = 807201324)
    public AdInterceptBean(Long id, long adId, int adPositionId, int boundedType,
                           String boundedTime) {
        this.id = id;
        this.adId = adId;
        this.adPositionId = adPositionId;
        this.boundedType = boundedType;
        this.boundedTime = boundedTime;
    }

    public AdInterceptBean(long adId, int boundedType, String boundedTime) {
        this(null, adId, 0, boundedType, boundedTime);
    }

    public AdInterceptBean(int adPositionId, String boundedTime) {
        this(null, 0L, adPositionId, AdManage.INTERCEPT_POSITION, boundedTime);
    }

    @Generated(hash = 1618120542)
    public AdInterceptBean() {
    }

    @Override
    public String toString() {
        return "AdInterceptBean{" +
                "id=" + id +
                ", adId=" + adId +
                ", adPositionId=" + adPositionId +
                ", boundedType=" + boundedType +
                ", boundedTime=" + boundedTime +
                '}';
    }
//限制次数
//    private int boundedCount;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getAdId() {
        return this.adId;
    }

    public void setAdId(long adId) {
        this.adId = adId;
    }

    public int getAdPositionId() {
        return this.adPositionId;
    }

    public void setAdPositionId(int adPositionId) {
        this.adPositionId = adPositionId;
    }

    public int getBoundedType() {
        return this.boundedType;
    }

    public void setBoundedType(int boundedType) {
        this.boundedType = boundedType;
    }

    public String getBoundedTime() {
        return this.boundedTime;
    }

    public void setBoundedTime(String boundedTime) {
        this.boundedTime = boundedTime;
    }

}
